package com.lin.cms.domain;

import java.io.Serializable;
import java.util.Date;

public class VoteRecord implements Serializable {

	private static final long serialVersionUID = 1L;

	private int voterecoredId;

	private int userId;

	private int votetopicId;

	private Date voteTime;

	private String voteIp;

	private String voteCookie;

	public VoteRecord() {
	}

	public int getVoterecoredId() {
		return voterecoredId;
	}

	public void setVoterecoredId(int voterecoredId) {
		this.voterecoredId = voterecoredId;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getVotetopicId() {
		return votetopicId;
	}

	public void setVotetopicId(int votetopicId) {
		this.votetopicId = votetopicId;
	}

	public Date getVoteTime() {
		return voteTime;
	}

	public void setVoteTime(Date voteTime) {
		this.voteTime = voteTime;
	}

	public String getVoteIp() {
		return voteIp;
	}

	public void setVoteIp(String voteIp) {
		this.voteIp = voteIp;
	}

	public String getVoteCookie() {
		return voteCookie;
	}

	public void setVoteCookie(String voteCookie) {
		this.voteCookie = voteCookie;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + voterecoredId;

		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final VoteRecord other = (VoteRecord) obj;
		if (voterecoredId != other.voterecoredId)
			return false;

		return true;
	}
	
	@Override
	public String toString() {
		return getClass().getName() + "@" + Integer.toHexString(hashCode()) + 
			"(" + 
			"voterecoredId=" + "'" + voterecoredId + "'" + 
			")";
	}
	
}
